package com.beans

/**
  * ClassName:AdLog
  * Package:com.beans
  * Desciption:
  *
  * @date:2019 /8/23 2:19
  * @author:17611219021 @sina.cn
  */
class AdLog(
             val province: String,
             val area: String,
             val age: String,
             val adplatformproviderid: String,
             val requestmode: String,
             val processnode: String,
             val iseffective: String,
             val isbiding: String,
             val isbid: String,
             val iswin: String,
             val adorderid: String,
             val adcreativeid: String,
             val adpayment: String,
             val winprice: String,
              val appname:String,
             val appid :String
           ) extends Product with Serializable {

  override def productElement(n: Int): Any = n match {
    case 0	=> province
    case 1	=> area
    case 2	=> age
    case 3	=> adplatformproviderid
    case 4	=> requestmode
    case 5	=> processnode
    case 6	=> iseffective
    case 7	=> isbiding
    case 8	=> isbid
    case 9	=> iswin
    case 10	=> adorderid
    case 11	=> adcreativeid
    case 12	=> adpayment
    case 13	=> winprice
    case 14	=> appname
    case 15	=> appid
  }

  ()

  override def productArity: Int = 3

  override def canEqual(that: Any): Boolean = that.isInstanceOf[AdLog]
}

//伴生对象，相当于静态方法？
object AdLog {
  def apply(array: Array[String]): AdLog = new AdLog(
    array(0),
    array(1),
    array(2)	.toString,
    array(3)	.toString,
    array(4)	.toString,
    array(5)	.toString,
    array(6)	.toString,
    array(7)	.toString,
    array(8)	.toString,
    array(9)	.toString,
    array(10)	.toString,
    array(11)	.toString,
    array(12)	.toString,
    array(13)	.toString,
    array(14)	.toString,
    array(15)	.toString
  )
}